Maintain relationship between tool bar image and default font width
authorPo Lu <luangruo@yahoo.com>
Mon, 3 Jun 2024 08:34:51 +0000 (16:34 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 3 Jun 2024 08:36:29 +0000 (16:36 +0800)
commit56376585134d627f96c71b7b063ec51548d3ad3f
treec1adb3192c8b11ac5ef10b2bd754b84ba7d0800b
parent760b54de080c238ea9f7b16055e820862d3e8896
Maintain relationship between tool bar image and default font width

* doc/lispref/display.texi (Image Descriptors): Document new
value of QCscale.

* lisp/cus-start.el (standard) <image-scaling-factor>: New
definition.

* lisp/image.el (image-scaling-factor): Move to C.
(create-image): Provide `default' as the default scaling factor.
(image--default-smoothing): Accept non-integer scaling factors.
(image-compute-scaling-factor): Document that this function
is no longer invoked by Emacs.

* lisp/tool-bar.el (tool-bar--image-expression): Disable
transform smoothing for tool-bar icons.

* src/dispextern.h (clear_image_cache): New definition.

* src/frame.c (gui_set_font): Clear such image cache entries as
derive their scales from the default font width.

* src/image.c (clear_image_cache): Export function.
(compute_image_size): Implement `default' by reading
Vimage_scaling_factor and/or computing a scale factor from the
frame's column width, as the case may be.
New argument F.  All callers changed.
(syms_of_image) <Vimage_scaling_factor>: Move from image.el.
doc/lispref/display.texi
lisp/cus-start.el
lisp/image.el
lisp/tool-bar.el
src/dispextern.h
src/frame.c
src/image.c